package com.example.cmtwo.service;

import com.example.cmtwo.bean.Commodity;
import com.example.cmtwo.mapper.CommodityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedList;
import java.util.List;

/**
 * @作者 CenturyLi
 * @时间 2020-06-03 15:46
 * @功能
 */
@Service
public class getCommoditybylhservice {

    @Autowired
    private CommodityMapper commodityMapper;

    public List<Commodity> getCommodityByLH(Integer lh)
    {
        List<Commodity> com = new LinkedList<Commodity>();
        try {
                com  = commodityMapper.getComBylh(lh);
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
            return com;
        }
        return com;
    }

}
